<?php namespace Common\Model;

use Hdphp\Model\Model;

//简历状态表
class Status extends Model{
	//定义模型
	protected $table = "status";


	//投递简历
	public function store(){
		$uid=$_SESSION['homeInfo']['uid'];
		$jid=Q('get.jid',0,'intval');
		$jidModel=new \Common\Model\Job;
		$job=$jidModel->where("jid=$jid")->find();
		if (!$job) return false;
		$row=$this->add(array(
			'lg_job_jid'=>$jid,
			'lg_user_uid'=>$uid,
			'status'=>0,
			'delivertime'=>time()
		));
		if ($row) return true;
		return false;
	}


}